home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gigarom 1
/
Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso
/
FILES
/
DEV
/
A-B
/
Alpha.5.05.cpt
/
Help
/
Alpha Tcl Extensions
< prev
next >
Wrap
Text File
|
1992-09-05
|
6KB
|
125 lines
==============================================================================
= Alpha's Additional Tcl Commands
==============================================================================
Some as of yet have no descriptions. Sorry.
• aeSend <'signature'|name> <string> - Send a 'misc' 'dosc' Apple event
to application named by either application signature (surrounded by
single quotes), or Application name. Thus, you can have "Alpha 5.02"
and "Alpha 5.02 Copy" sending Apple events to each other.
• ascii (see bindings)
• beep
• bind (see bindings)
• blink <pos> - blink cursor at 'pos'
• breakIntoLines <string> - return 'string' with
carriage returns and spaces inserted to satisfy
'leftFillColumn' and 'fillColumn' variables.
• bringToFront <winName> - Bring named window to front.
• colors <fore red> <fore green> <fore blue> <back red> <back green> <back blue>
• createTMark <name> <pos> - create a temporary 'mark'
at location 'pos'.
• deleteText <pos1> <pos2> - remove text between 'pos1'
and 'pos2'
• displayMode <mode> - Up to four characters of the 'mode' string are
displayed in the status line at the bottom of a window.
• echo <string> [<string>...] - echo the strings (used
in shells).
• edit <name> [readOnly] - open a file in a new
window. Any second parameter causes the window to be
opened as read-only.
• fileMenu <name> <dir> <rdonly> <list of menu items> - Defines a new user
menu named 'name'. The menu is not yet inserted into the menubar. The menu
commands may be nested for heirarchical menus, see 'AlphaBits.tcl' for
examples. Unlike the 'menu' command, when items of this type of menu
are selected the text is interpreted as a file-name, and Alpha attempts
to open that file. The 'dir' argument is prepended to every file name
before the file is opened. If 'rdonly' is non-zero, the file is opened
read-only.
• getGeometry - return a TCL list containing the left
edge of the current window, the top, the width, and
height.
• getMark - return the current mark.
• getPos - return the current insertion point
• getSelect - return the currently selected text, if
any.
• getText <pos1> <pos2> - return the text between 'pos1'
and 'pos2'.
• getVar <name> - return the value of the Alpha variable
'name'.
• goto <pos> - goto the position 'pos'.
• gotoTMark <name> - goto the temporary mark 'name'.
• hiliteMenuItem <menuName> <itemNum> <on|off> - Either
enable or disable the 'itemNum'th menu item of user
menu 'menuName. Note that unless the menu is not only created, but also
inserted, this command has no effect.
• insertMenu <name> - insert the previously created user
menu 'name' into the menuBar.
• insertText [-w <win name>] <text> [<text>]... - Insert 'text' at the current
insertion point.
• lineStart <pos> - return the position of the start of
the line 'pos' is on.
• lookAt <pos> - return the 'pos'th character of the
current file.
• maxPos - returns the number of characters in the front
window.
• menu <name> <list of menu items> - Defines a new user
menu named 'name'. The menu is not yet inserted into
the menubar. The menu commands may be nested for
heirarchical menus, see 'AlphaBits.tcl' for examples.
Alpha massages the function names to make them look better
in the menus.
• message <string> - prints 'string' on the status line.
• mkdir <name> - creates a directory (folder) named
'name' in the current directory.
• moveWin [win name] <left> <top> - moves current or specified window.
• nextLineStart <pos> - return the position of the start
of the next line after position 'pos'.
• prompt <prompt> <default> [<name> <menu item>...]
- prompt dialog to the user with a prompt string and a
default value. The prompt dialog can optionally
include a popup menu specified by 'name' and the
succeeding strings. Selection of the popup menu items
inserts the item text into the editable dialog item.
'Prompt' returns the value of the editable item.
• removeMenu <name> - remove menu 'name' from menubar.
• removeTMark <name> - remove temporary mark.
• replaceText <pos1> <pos2> <text> - replaces the text
between 'pos1' and 'pos2' with 'text'.
• search <pattern> <pos> [limit] [noFail] - searches for
'pattern' from position 'pos' using current values of
'forward', 'matchWords', 'ignoreCase', and 'regExpr'.
If 'limit' is specified, the search fails if the a
match is not found totally contained between 'pos' and
'limit'. If any fourth argument is specified, a search
failure still results TCL_OK. However, the result of
the call is then just an empty string. If the search
succeeds, a list of two positions will be returned.
The first is the starting position of the match, the
second is one past the last character.
• select <pos1> <pos2> - selects the text between 'pos1'
and 'pos2'.
• selEnd - returns the end of the hilited selection, or
the current insertion point if no text is selected.
• sendToBack <winName> - Sent named window to back.
• setFSets - (see the File Sets section).
• setVar <name> <value> - Sets the Alpha variable 'name'
to 'value'.
• sizeWin [win name] <width> <height> - sets size of current or specified window.
• sortRange <fromPos> <toPos>
• substituteVars <string> - Takes a single string and
substitutes for all variables inside it, regardless of
depth. Unfortunately, you currently need to make 'global var'
declarations in the proc you call this for each 'var' that might need
to be substituted in the string (see proc.tcl for examples).
• switchTo <appName> - Switches to application 'appName'.
• tclResult - displays a dialog showing the result of
the last TCL evaluation.
• traceFunc on <funcName> <winName> Trace 'funcName', send output to
'winName'.
traceFunc off Turn function tracing off.
traceFunc status Display current tracing status.
• winNames - return a TCL list of all open windows.
• wrapText